#include<iostream>
#include<string.h>
#include <stdio.h>
class Date
{
	private:
	 	int year;
	 	int month;
	 	int day;
	public:
	Date()
	{
		year=1900;
		month=1;
		day=1;
	}
	Date(int dayc, int monthc, int yearc)
	{
		year=yearc;
		month=monthc;
		day=dayc;
	}
	int setYear(int yearc)
	{
		year=yearc;
	}
	bool setMonth(int monthc){
		if(isMonthValid(monthc)){
			month=monthc;
			return true;
		}
		return false;
	}
	bool setDay(int dayc,int monthc){
		if(isDayValid(dayc,monthc)){
			day=dayc;
			return true;
		}
		return false;
	}
	static bool isMonthValid(int monthc) 
	{
		if(monthc>=0 && monthc<=12)
			return true ;
		else
			return false;
	}
	static bool isDayValid(int dayc,int monthc) {
		int maxDay=0;
		switch (monthc) {
			case 3: case 5: case 9: case 10: maxDay=30; break;
			case 2: maxDay=28; break;
			default: maxDay=31;
		}
		if(dayc>=0 && dayc<=maxDay)
			return true;
		else
			return false;

	}
	char* getMonthString (int monthc)
	{		
		char *stringa=new char[20];
			strcpy(stringa,"ciao");
		
		int maxDay=0;
		switch(monthc)
		{
			
				break;case 1: strcpy(stringa,"Gennaio");
				break;case 2: strcpy(stringa,"Febbario");
				break;case 3: strcpy(stringa,"Marzo");
				break;case 4: strcpy(stringa,"Aprile");
				break;case 5: strcpy(stringa,"Maggio");
				break;case 6: strcpy(stringa,"Giugno");
				break;case 7: strcpy(stringa,"Luglio");
				break;case 8: strcpy(stringa,"Agosto");
				break;case 9: strcpy(stringa,"Settembre");
				break;case 10: strcpy(stringa,"Ottobre");
				break;case 11: strcpy(stringa,"Novembre");
				break;case 12: strcpy(stringa,"Dicembre");
				break;
		}	
		return stringa;
	}
	void stamp()
	{
		printf("La data corrente e'%d %s %d",day,getMonthString(month)	,year);
	}	
		 

};
